Logic programming represents one of the main branches of computer-programming. Unlike familiar procedural programming languages, including C, C++, Java, Fortran, Ruby, and many other procedural languages, logic programming focuses on declarative specification of logic, encoding logic in predicates and rules. Theoretical groundwork for logic programming was developed in the 1930s and logic-programming systems began to be practically implemented in the late 1960s. In 1972, the logic-programming language Prolog was developed. Prolog programs include predicates, rules, and many built-in predicates and operators. Prolog programs are processed at runtime by a proof rule called resolution. There are many different Prolog implementations and dialects, and many additional Prolog-like logic-programming languages, including HiLog, F-logic, and λ-Prolog.
Logic programming is widely used for implementing knowledge-based expert systems. These systems may be used for complex scheduling and operations management, management and control of automated order-processing, verification of integrated-circuit design, analysis of data obtained from a variety of different types of instrumentation, diagnosis of operational behaviors and failures of complex systems, and for many other purposes.
As with any type of computational method, there are different advantages and disadvantages associated with logic programming. The declarative focus of logic programming often facilitates concise implementations of complex computational, freeing developers from the need to encode procedural routines specifically tailored to particular problem domains. Logic programming is frequently employed for prototyping, for this reason. Evaluation of predicates and rules encoded within programs written using logic programming may involve complex, recursive searching operations over large numbers of facts and rules stored in memory and mass-storage subsystems within computer systems, using various types of search strategies or combinations of search strategies. The computational efficiency of logic-programming systems may often depend on the underlying efficiencies of storage and retrieval methods for facts and rules, of which users of logic-programming languages may be unaware. As logic-programming languages and logic-programming computational systems continue to evolve, designers, developers, and users of logic programming continue to seek ever more computationally efficient methods for representing information and for processing queries related to that information.